import pytest,logging,yagmail
def log1():
    logging.basicConfig(level=logging.DEBUG,
                        format='%(levelname)s %(message)s %(asctime)s %(filename)s %(linoen)d',
                        filename='hj.log',
                        filemode='wb')
def log2():
    mail=yagmail.SMTP(user='3034738910@qq.com',password='aytttpqxjbbrddjh',host='smtp.qq.com')
    mail.send(to='3034738910@qq.com',subject='测试报告',contents='今日报告,请查收',attachments='pytest.html')
def Report():
    (open('hj.html','-s'),
                    )